package com.deepclassifieds.daas.api.jdbc;

import com.deepclassifieds.daas.api.DaasExpression;
import com.deepclassifieds.daas.common.Name;
import com.deepclassifieds.daas.common.Reject;

public class DaasExpressionEqNumberJdbcImpl implements DaasExpression {
	
	private final Name columnName;
	private final Number value;
	
	DaasExpressionEqNumberJdbcImpl(Name columnName, Number value) {
		Reject.ifNull(columnName);
		this.columnName = columnName;
		this.value = value;
	}

	@Override
	public String toString() {
		return columnName + " = " + (value != null ? value : "NULL");
	}
}
